package com.example.android;

import java.sql.Connection;
import java.util.ArrayList;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.*;

public class Screen extends Activity {
	String[] servers = new String[] { "Yahoo", "Hotmail", "Gmail" };
	EditText edit1, edit2;
	CheckBox receiveemail;
	Spinner combo;
	Connection connection;

	public void onCreate(Bundle b) {
		super.onCreate(b);
		setContentView(R.layout.screen);
	}

	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
		menu.add(0, 0, 0, "Salvar");
		menu.add(0, 1, 0, "Sair");
		return true;
	}

	public boolean onMenuItemSelected(int featuredId, MenuItem item) {
		switch (item.getItemId()) {
		case 0:
			edit1 = (EditText) findViewById(R.id.nameinput); /* Nome */
			edit2 = (EditText) findViewById(R.id.emailinput); /* Email */
			combo = (Spinner) findViewById(R.id.servidorinput); /* Servidor */
			ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
					R.layout.screen, servers);
			combo.setAdapter(adapter);
			receiveemail = (CheckBox) findViewById(R.id.receberemailmark);
			if (receiveemail.isChecked()) {

			}
			break;

		case 1:
			finish();
			break;
		}
		return false;
	}
}